<template>
  <div style="height:240px;overflow:hidden;margin-top: 5px">
    <el-card shadow="never" class="box-card">
      <div slot="header" class="clearfix">
        <span>一周工作通报</span>
      </div>
      <el-table :data="work" class="left_menu_side">
        <el-table-column :show-overflow-tooltip="true" label="名称">
          <template slot-scope="scope">
            <a @click="showSingle(scope.row)">{{scope.row.subject}}</a>
          </template>
        </el-table-column>
        <el-table-column prop="publisher" label="发布人" width="70"></el-table-column>
        <el-table-column prop="publishtime" label="发布时间" width="148" :show-overflow-tooltip="true"></el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script type="text/javascript">
  import {ACCESS_TOKEN} from "@/store/mutation-types"
  import Vue from 'vue'
  import { handleUrl, openIFrame } from '@/utils/util'

  export default {
    data () {
      return {
        arrange:[
          {name:'局领导一周日程安排'},{name:'全局一周工作安排'}
        ],
        work:[]
      }
    },
    mounted(){
      this.getAdminList()
    },
    methods:{
      showSingle(record){
        let baseUrl = process.env.VUE_APP_ADD_HTTP;
        let ticket = Vue.ls.get(ACCESS_TOKEN);
        let docid = record.docid;
        let url = baseUrl + "/Modules/PublicDocument/view/view.htm?LoginMethod=ssologin&ticket=" +
          ticket + "&id=" + docid + "";
        openIFrame(record.docid,'/'+record.docid,record.subject,url)
        this.$router.push({ name: record.docid })
      },
      getAdminList(){
        let that = this;
        let params = {
          getCount: false,
          guid: "rcgz_yzgztb",
          intTypeId: 55,
          serviceName: "Xinfo.Bus.BL.Service.EgovPlatform.PortalLet.PublicDocmentPortalLetService,Xinfo.Bus.BL.Service",
          strBizType: ""
        }
        this.getRequest("/PortalLet/GetPortalLetData",params)
          .then(res => {
            that.work = res.data;
          })
      },
    }
  }
</script>